package com.bright.ghj.overt.constant;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Author hxj
 * @Date 2025/1/22 17:08
 * @Description 对接第三方的参数
 */
@Component
@ConfigurationProperties(prefix = "docking")
@ConditionalOnProperty(name = "docking.enable", havingValue = "true")
public class DockingConstant {

    // 存储第三方的appKey和appSecret
    private Map<String, String> appConfig;

    public Map<String, String> getAppConfig() {
        return appConfig;
    }

    public void setAppConfig(Map<String, String> appConfig) {
        this.appConfig = appConfig;
    }

    public String getAppSecretByAppKey(String appKey) {
        return appConfig.get(appKey);
    }

}
